import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import OneView from '../components/system/one.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/one',
    component:OneView,
    children:[
      {
        path:"/one/one/:id",
        component:()=>import('../components/system/one_one.vue')
      },
      {
        path:"/one/two",
        name:"oneTwo",
        component:()=>import('../components/system/one_two.vue')
      },
      {
        path:"/one/three",
        component:()=>import('../components/system/one_three.vue'),
        children:[
          {
            path:"/one/three/one",
            component:()=>import('../components/system/ont_three_one.vue')
          }
        ]
      }
    ]
  },
  {
    path:"/page",
    component:()=>import('../views/PageView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
